﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	x:Class="JBot.Windows.OptionsWindow"
	x:Name="Window"
	Title="Options"
	WindowStartupLocation="CenterOwner"
	Width="503" Height="340" mc:Ignorable="d">

	<Grid x:Name="LayoutRoot">
		<Grid.RowDefinitions>
			<RowDefinition Height="0.93*"/>
			<RowDefinition Height="29.96"/>
		</Grid.RowDefinitions>
		<TabControl Margin="8">
			<TabItem Header="XMPP">
				<GroupBox Header="XMPP settings">
					<Grid Margin="0,0,0,0">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="125" />
							<ColumnDefinition Width="200*" />
						</Grid.ColumnDefinitions>
						<WrapPanel HorizontalAlignment="Stretch" Margin="8" Name="WP_XMPP_Ls" VerticalAlignment="Stretch">
							<Label Content="Login" Name="La_Login" Width="{Binding ElementName=WP_XMPP_Ls, Path=ActualWidth}" />
							<Label Content="Password" Name="La_Password" Width="{Binding ElementName=WP_XMPP_Ls, Path=ActualWidth}" />
							<Label Content="Server" Name="La_Server" Width="{Binding ElementName=WP_XMPP_Ls, Path=ActualWidth}" />
							<Label Content="Port" Name="La_Port" Width="{Binding ElementName=WP_XMPP_Ls, Path=ActualWidth}" />
						</WrapPanel>
						<WrapPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="8" Name="WP_XMPP_Ts" VerticalAlignment="Stretch">
							<TextBox Height="23" Name="TB_Login" Width="{Binding ElementName=WP_XMPP_Ts, Path=ActualWidth}" Margin="0,2" KeyDown="textBox_KeyDown" />
							<PasswordBox Height="23" Name="TB_Password" Width="{Binding ElementName=WP_XMPP_Ts, Path=ActualWidth}" Margin="0,2" KeyDown="textBox_KeyDown" />
							<TextBox Height="23" Name="TB_Server" Width="{Binding ElementName=WP_XMPP_Ts, Path=ActualWidth}" Margin="0,2" KeyDown="textBox_KeyDown" />
							<TextBox Height="23" Name="TB_Port" Width="{Binding ElementName=WP_XMPP_Ts, Path=ActualWidth}" Margin="0,2" KeyDown="textBox_KeyDown" />
						</WrapPanel>
					</Grid>
				</GroupBox>
			</TabItem>
			<TabItem Header="Connection">
				<GroupBox Header="Connection settings">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="125" />
							<ColumnDefinition Width="200*" />
						</Grid.ColumnDefinitions>
						<WrapPanel HorizontalAlignment="Stretch" Margin="8" Name="WP_Connection_Ls" VerticalAlignment="Stretch">
							<Label Content="SSL" Name="La_SSL" Width="{Binding ElementName=WP_Connection_Ls, Path=ActualWidth}" />
							<Label Content="StartTLS" Name="La_STLS" Width="{Binding ElementName=WP_Connection_Ls, Path=ActualWidth}" />
							<Label Content="Keep alive" Name="La_Alive" Width="{Binding ElementName=WP_Connection_Ls, Path=ActualWidth}" />
							<Label Content="Keep alive interval" Name="La_AliveInt" Width="{Binding ElementName=WP_Connection_Ls, Path=ActualWidth}" />
						</WrapPanel>
						<WrapPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="8" Name="WP_Connection_Ts" VerticalAlignment="Stretch">
							<ComboBox Height="23" Name="CB_SSL" Width="{Binding ElementName=WP_Connection_Ts, Path=ActualWidth}" Margin="0,2" SelectedIndex="0" KeyDown="textBox_KeyDown">
								<ComboBoxItem Content="Yes"/>
								<ComboBoxItem Content="No" />
							</ComboBox>
							<ComboBox Height="23" Name="CB_STLS" Width="{Binding ElementName=WP_Connection_Ts, Path=ActualWidth}" Margin="0,2" SelectedIndex="0" KeyDown="textBox_KeyDown">
								<ComboBoxItem Content="Yes" />
								<ComboBoxItem Content="No" />
							</ComboBox>
							<ComboBox Height="23" Name="CB_Alive" Width="{Binding ElementName=WP_Connection_Ts, Path=ActualWidth}" Margin="0,2" SelectedIndex="0" KeyDown="textBox_KeyDown">
								<ComboBoxItem Content="Yes"/>
								<ComboBoxItem Content="No" />
							</ComboBox>
							<TextBox Height="23" Name="TB_AliveInt" Width="{Binding ElementName=WP_Connection_Ts, Path=ActualWidth}" Margin="0,2" KeyDown="textBox_KeyDown" />
						</WrapPanel>
					</Grid>
				</GroupBox>
			</TabItem>
			<TabItem Header="Bot">
				<GroupBox Header="Bot settings">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="125" />
							<ColumnDefinition Width="200*" />
						</Grid.ColumnDefinitions>
						<WrapPanel HorizontalAlignment="Stretch" Margin="8" Name="WP_Bot_Ls" VerticalAlignment="Stretch">
							<Label Content="Nickname" Name="La_NickName" Width="{Binding ElementName=WP_Bot_Ls, Path=ActualWidth}" />
							<Label Content="Admin JID" Name="La_AdminJID" Width="{Binding ElementName=WP_Bot_Ls, Path=ActualWidth}" />
							<Label Content="Default status" Name="La_Status" Width="{Binding ElementName=WP_Bot_Ls, Path=ActualWidth}" />
							<Label Content="Default description" Name="La_Description" Width="{Binding ElementName=WP_Bot_Ls, Path=ActualWidth}" />
						</WrapPanel>
						<WrapPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="8" Name="WP_Bot_Ts" VerticalAlignment="Stretch">
							<TextBox Height="23" Name="TB_NickName" Width="{Binding ElementName=WP_Bot_Ts, Path=ActualWidth}" Margin="0,2" KeyDown="textBox_KeyDown" />
							<TextBox Height="23" Name="TB_AdminJID" Width="{Binding ElementName=WP_Bot_Ts, Path=ActualWidth}" Margin="0,2" KeyDown="textBox_KeyDown" />
							<ComboBox Height="23" Name="CB_Status" Width="{Binding ElementName=WP_Bot_Ts, Path=ActualWidth}" Margin="0,2" KeyDown="textBox_KeyDown">
								<ComboBoxItem Content="Connected"/>
								<ComboBoxItem Content="Free for chat" />
								<ComboBoxItem Content="Away" />
								<ComboBoxItem Content="X away" />
								<ComboBoxItem Content="DND" />
								<ComboBoxItem Content="Invisible" />
								<ComboBoxItem Content="Disconnected" />
							</ComboBox>
							<TextBox Height="23" Name="TB_Description" Width="{Binding ElementName=WP_Bot_Ts, Path=ActualWidth}" Margin="0,2" KeyDown="textBox_KeyDown" />
						</WrapPanel>
					</Grid>
				</GroupBox>
			</TabItem>
			<TabItem Header="Scripts">
				<GroupBox Header="Scripts list">
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="1*"/>
						</Grid.RowDefinitions>
						<StackPanel Orientation="Horizontal">
							<Button x:Name="buttonScriptAdd" Content="Add script" Padding="3,2" Margin="3" />
							<Button x:Name="buttonScriptEdit" Content="Edit script" Padding="3,2" Margin="3" />
							<Button x:Name="buttonScriptDelete" Content="Remove script" Padding="3,2" Margin="3" />
							<Separator>
								<Separator.LayoutTransform>
									<TransformGroup>
										<ScaleTransform/>
										<SkewTransform/>
										<RotateTransform Angle="90"/>
										<TranslateTransform/>
									</TransformGroup>
								</Separator.LayoutTransform>
							</Separator>
							<Button x:Name="buttonScriptMoveUp" Content="Move up" Padding="3,2" Margin="3" />
							<Button x:Name="buttonScriptMoveDown" Content="Move down" Padding="3,2" Margin="3" />
						</StackPanel>
						<ListView x:Name="listViewScripts" Grid.Row="1">
							<ListView.View>
								<GridView>
									<GridViewColumn Header="Script name" DisplayMemberBinding="{Binding Name}"/>
									<GridViewColumn Header="Script location" DisplayMemberBinding="{Binding Path}"/>
								</GridView>
							</ListView.View>
						</ListView>
					</Grid>
				</GroupBox>
			</TabItem>
		</TabControl>
		<Button HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="75" Content="Default" Grid.Row="1" Margin="8,0,0,8" Name="B_Reset" Click="B_Reset_Click" />
		<Button HorizontalAlignment="Right" Margin="0,0,8,8" VerticalAlignment="Bottom" Width="75" Content="Apply" Grid.Row="1" Name="B_Apply" Click="B_Apply_Click" />
		<Button Margin="0,0,166,8" VerticalAlignment="Bottom" Content="OK" Grid.Row="1" HorizontalAlignment="Right" Width="75" Name="B_OK" Click="B_OK_Click" />
		<Button HorizontalAlignment="Right" Margin="0,0,87,8" Width="75" Content="Cancel" Grid.Row="1" d:LayoutOverrides="Height" VerticalAlignment="Bottom" Name="B_Cancel" IsCancel="True"/>
	</Grid>
</Window>